import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';
import menu from '@/assets/menuIcon/menu7.png';

const moduleName = 'formwork';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/formwork',
    name: moduleName,
    component: RouterView,
    redirect: '/formwork/review',
    meta: {
      title: '模板与方法',
      icon: menu,
    },
    children: [
      {
        path: 'review',
        name: `${moduleName}-review`,
        component: () => import('@/views/formwork/review/index.vue'),
        meta: {
          title: '报告模板管理',
        },
      },
      {
        path: 'approach',
        name: `${moduleName}-approach`,
        component: () => import('@/views/formwork/approach/index.vue'),
        meta: {
          title: '方法管理',
        },
      },
      {
        path: 'archive',
        name: `${moduleName}-archive`,
        component: () => import('@/views/formwork/archive/index.vue'),
        meta: {
          title: '文档管理',
        },
      },
    ],
  },
];

export default routes;
